Where can I find php.ini? Utpal Vishwas31514-Jul-2023Where can I find php.ini?phpphp file Updated on 15-Jul-2023
Aryan Kumar
15-Jul-2023The location of the
php.ini
file depends on your operating system and how PHP is installed on your system.Windows
On Windows, the
php.ini
file is typically located in one of the following locations:C:\Windows\php.ini
C:\php\php.ini
C:\Program Files (x86)\PHP\php.ini
Linux
On Linux, the
php.ini
file is typically located in one of the following locations:/etc/php/php.ini
/etc/php5/php.ini
/etc/php.d/php.ini
macOS
On macOS, the
php.ini
file is typically located in one of the following locations:/etc/php/7.4/php.ini
/etc/php/7.3/php.ini
/etc/php/7.2/php.ini
If you are not sure where the
php.ini
file is located on your system, you can use thephpinfo()
function to display the location of the file.To do this, open a web browser and navigate to the following URL:
This will display the
phpinfo()
page, which will include the location of thephp.ini
file in the Configuration section.